﻿using FD.RemoteAssistant.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FDRemoteAssistant2.Models
{
    /*
     * CreatedOn: 2018-07-23
     * CreatedBy: Jackie Lee(天宇遊龍)
     */
    public class MenuDataChangedArgs : EventArgs
    {
        /// <summary>
        /// 数据变化类型
        /// </summary>
        public ChangeType ChangeType { get; set; }

        /// <summary>
        /// 变化的项
        /// </summary>
        public IRemoteSetting RemoteSetting { get; set; }

        /// <summary>
        /// 修改前菜单名
        /// </summary>
        public string OldMenuName { get; set; }

        public MenuDataChangedArgs(IRemoteSetting remoteSetting, ChangeType changeType)
        {
            ChangeType = changeType;
            RemoteSetting = remoteSetting;
        }

        public MenuDataChangedArgs(IRemoteSetting remoteSetting, ChangeType changeType, string oldMenuName)
        {
            ChangeType = changeType;
            RemoteSetting = remoteSetting;
            OldMenuName = oldMenuName;
        }
    }

    public enum ChangeType : byte
    {
        DataAdd,
        DataRemove,
        DataModify
    }
}
